<?php session_start(); 
include 'connect.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
                    "http://www.w3.org/TR/html4/loose.dtd">
<link rel="stylesheet" type="text/css" href="styles.css"/>
<link rel="stylesheet" type="text/css" href="forms.css">
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
  <script>
  $(document).ready(function(){
    $("#bookForm").validate();
  });
  </script>
</head>
<body>
  
<div class="logo"></div> 
<div id="container">
<div id="MainContent">

</head>
<body>

<?php
$query = mysql_query("SELECT * FROM project WHERE ProjectName = '".$_POST['projMenu']."'");
$projName = mysql_fetch_array($query);
$_SESSION['selectedCreator'] = $projName['CreatorID'];
$_SESSION['selectedProj'] = $_POST['projMenu'];
$_SESSION['selectedVers'] = $projName['Version'];
$_SESSION['selectedStatus'] = $projName['Status'];
$_SESSION['selectedDesc'] = $projName['Description'];
$today = date('o-m-d h:i:s');
$_SESSION['today'] = $today;

if($_SESSION['MemberID'] == $_SESSION['selectedCreator'])
{
echo "You're the Creator of this Project";
}
else
{
	echo"You're Not the Creator. If you want more functionality, please contact the Project Creator.";
}
?>


<form action="editThankYou.php" method="post" >

<fieldset>
<legend class="title">Update the Project</legend>
	<label for ="name">Project Name:</label><br />
	<input type = "text" name="name" value="<?php echo $projName['ProjectName']?>"/><br />
	<label for ="vers">Version: </label><br />
	<input type = "text" name="vers" value="<?php echo $projName['Version']?>"/><br />
	<label for = "status">Status: </label><br />
	<input type = "text" name="status" value="<?php echo $projName['Status']?>"/><br />
		<hr /> 
	<label for = "description">  Description:</label> <br />
	<textarea name="description"><?php echo $projName['Description'] ?></textarea>

	<p>
	<input type="hidden" value = "<?php echo $today ?>" />
	<input type="submit" value="Update" name="Update"/>
	<input type="submit" value="Delete" name="Delete"/>
	<a href="projMan.php">Cancel</a>
   </p>
</fieldset>
</form>

</div>
</div>
</body>
</html>